<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script>
	var arr1=[1,2,'hello',3,'red']
	var arr2=[3,'hello',8,'red',9]
	
	var arr4=[];
	var arr5=[]
	function fn(arri,arrk){
		var arr3=arri.concat(arrk);
		for(var i=0;i<arr3.length;i++){
			if(arr4.indexOf(arr3[i]===-1)){
			arr4.push(arr3[i])}
		}

		for(var k=0;k<arr4.length;k++){
			if(arr1.indexOf(arr4[k])===-1){
				arr5.push(arr4[k])
			}
			if(arr2.indexOf(arr4[k])===-1){
				arr5.push(arr4[k])
			}
		}

               console.log(arr5)

		}
		fn(arr1,arr2)
	

	</script>
</head>
<body>
	
</body>
</html>